global Source,Destination,StartCard,CopyCard,NumberOfCards,Selection
put empty into Destination
get the name of this stack
put word 2 of it into Source
get the id of this card
put it into StartCard
put "Will copy from stack" && Source && ", starting with" && StartCard
set lockScreen to true
answer "What is the Destination stack?" with "Name" or "Search" or "Cancel"
if it = "Cancel" then hide message
if it = "Cancel" then exit mouseUp
if it = "Search" then put empty into it
if it = "Name" then ask "What is the Source name?" with empty else Search
if it <> empty then put numToChar(34) & it & numToChar(34) into temp1
if Destination = empty then put temp1 into Destination
put "Will copy to stack" && Destination
go to Source
go to StartCard
ask "Number of Cards (Including this Card)" with empty
put it into NumberOfCards
put empty into Selection
repeat for NumberOfCards times
put Selection & the id of this card & return into Selection
put "Getting information from" && the id of this card
go to next card
end repeat
put 0 into temp1
repeat for NumberOfCards times
add 1 to temp1
put line temp1 of Selection into temp2
go to temp2
put "Copying" && temp2
doMenu "Copy Card"
go to last card of Destination
put "Pasting" && temp2
doMenu "Paste Card"
if temp1 = 1 then get the id of this card
put it into CopyCard
go to Source
end repeat
set lockScreen to false
put "Copying complete"
wait for 2 seconds
hide message
answer "Remove CopyStack from this operation?" with "Yes" or "No"
if it = "No" then go to StartCard
if it = "No" then hide message
if it = "No" then exit mouseUp
set lockScreen to true
choose button tool
go to Destination
go to CopyCard
click at the loc of card button "CopyStack"
doMenu "Cut Button"
go to Source
go to StartCard
click at the loc of card button "CopyStack"
doMenu "Cut Button"
choose browse tool
set lockScreen to false
end mouseUp
-- part contents for card part 9
----- text -----
CopyStack Version 1.00
Have you ever wanted to add a card or series of cards from one stack to another? This stack will copy a card or consecutive series of cards from a "Source" stack to a "Destination" stack, automatically.
Start by selecting Put CopyStack In Memory. Use COPIES of the originals until you are familiar with the operation of this stack. Then go to the card in the stack you wish to copy from. Once there, select Edit/Paste Button or use Command-V. Choose the browse tool on the Tools menu. Now count the cards that you want to copy. It is best to use Command-3 just in case the "Go Next" buttons do not select consecutive cards. Return to the card that has CopyStack on it. Click on CopyStack and answer the Destination question using the full name of the stack or having the Search function locate it. The Search function is a little script used for locating stack names, feel free to implement it in your own stacks. You will be prompted for the number of cards that are to be copied from the Source stack to the Destination stack. A running commentary will appear in the message box. Once completed, CopyStack will return and ask if you wish to remove the CopyStack button. Use Install CopyStack On Home for installing CopyStack on your Home card for future use.
LIMITATIONS: CopyStack was not designed to be all powerful! It cannot anticipate the cards you want copied from one stack to another. Be careful counting the cards that you want to copy and always include the card that has CopyStack on it. CopyStack will always put the copied cards at the end of the Destination stack. Also, if the author has been rude enough to put in a safeguard to stop you from looking at the cards scripts, try CopyStack only on a copy of the offending program. If you have any ideas on how to improve this stack, let me know. Please write to me at the following address.
Wallace Karraker, CIS 76354,3026, Dodge City, Kansas
(p.s. If a catastrophic system error does occur, I KNOOOW KNOTHINK)